package com.itshizhan.itjidancideveloper.controller.ucenter

import com.itshizhan.itjidancideveloper.dao.ucenter.ArticleCategoryDao
import com.itshizhan.itjidancideveloper.models.ArticleCategory
import com.itshizhan.itjidancideveloper.response.Response
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

@RestController()
@RequestMapping("/ucenter/articleCategory")
class ArticleCategoryController(private var articleCategoryDao: ArticleCategoryDao) {
    @GetMapping("/list")
    fun getList(): Response<MutableList<ArticleCategory>> {
        val list = articleCategoryDao.findAll()
        return Response.success(list)
    }
}